import Login from "../views/Login"
import Register from "../views/Register"
import Home from "../views/Home"
import NotFind from '../views/NotFind'
import User from '../views/subs/system/User'
import Role from '../views/subs/system/Role'
import Main from '../views/subs/Main'
import Shop from "../views/subs/system/Shop"
import ProductList from "../views/subs/product/ProductList"
import ProductCategory from "../views/subs/product/ProductCategory"
import Salary from "../views/subs/chart/Salary"
import Sale from "../views/subs/chart/Sale"
import ProductAdd from '../views/subs/product/ProductAdd'
import ProductUpdate from '../views/subs/product/ProductUpdate'
import RouterAuth from "./RouterAuth"

const routes = [
    {path:"/login",element:<Login></Login>},
    {path:"/register",element:<Register></Register>},
    {path:"/home",element:<RouterAuth><Home></Home></RouterAuth>,children:[
        {path:"",element:<Main></Main>},
        {path:"user",element:<User></User>},
        {path:"role",element:<Role></Role>},
        {path:"shop",element:<Shop></Shop>},
        {path:"list",element:<ProductList></ProductList>},
        {path:"category",element:<ProductCategory></ProductCategory>},
        {path:"salary",element:<Salary></Salary>},
        {path:"sale",element:<Sale></Sale>},
        {path:"productadd",element:<ProductAdd></ProductAdd>},
        {path:"productupdate",element:<ProductUpdate></ProductUpdate>},
    ]},
    {path:"*",element:<NotFind></NotFind>},
]

export default routes